package org.com.money.componet;

import java.io.File;
import java.util.HashMap;
import java.util.Map;

/**
 * 訊息元件
 * @author Andy
 *
 */
public class MessageUtils {
	private final static Map<String, String> map = new HashMap<String, String>();
	public final static String ERROR_PROPERTIES = "error.properties";
	static {
		final PropertiesComponet componet = new PropertiesComponetImpl();

		final Map<String, Object> errorMap = 
				componet.outputfilePath(new File(
				ERROR_PROPERTIES));
		for (String code : errorMap.keySet()) {
			map.put((String) code, (String) errorMap.get(code));
		}

	}

	public static String getContentByCode(String code) {
		return map.get(code);
	}
}
